WORKERS AHEAD!
You are viewing the development documentation for the Apereo CAS server. The functionality presented here is not officially released yet. This is a work in progress and will be continually updated as development moves forward. You are most encouraged to test the changes presented.
To view the documentation for a specific Apereo CAS server release, please choose an appropriate version. The release schedule is available here.YubiKey Authentication
Yubico is a cloud-based service that enables strong, easy-to-use and affordable
two-factor authentication with one-time passwords through their
flagship product, YubiKey. Once Yubico client-id and secret-key
are obtained, then the configuration options available to
use YubiKey devices as a primary authentication
source that CAS server could use to authenticate users.
To configure YubiKey accounts and obtain API keys, refer to the documentation.
YubiKey authentication components are enabled by including the following dependencies in the WAR overlay:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-yubikey</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-yubikey:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-yubikey"
}
Actuator Endpoints
The following endpoints are provided by CAS:
Configuration
The following settings and properties are available from the CAS configuration catalog:
cas.authn.mfa.yubikey.bypass.groovy.location=
The location of the resource. Resources can be URLS, or files found either on the classpath or outside somewhere in the file system. |
cas.authn.mfa.yubikey.bypass.rest.url=
The endpoint URL to contact and retrieve attributes. |
cas.authn.mfa.yubikey.crypto.encryption.key=
The encryption key is a JWT whose length is defined by the encryption key size setting. |
cas.authn.mfa.yubikey.crypto.signing.key=
The signing key is a JWT whose length is defined by the signing key size setting. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].host=
Server's host address. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].port=
Server's port number. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].replica-of=
Set the id of the master node. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].type=
Indicate the type/role of this node.
Accepted values are: |
cas.authn.mfa.yubikey.redis.cluster.password=
The cluster connection's password. |
cas.authn.mfa.yubikey.redis.pool.enabled=false
Enable the pooling configuration. |
cas.authn.mfa.yubikey.redis.sentinel.master=
Name of Redis server. |
cas.authn.mfa.yubikey.client-id=0
Yubikey client id. |
cas.authn.mfa.yubikey.rest.url=
The endpoint URL to contact and retrieve attributes. |
cas.authn.mfa.yubikey.secret-key=
Yubikey secret key. |
cas.authn.mfa.yubikey.couch-db.db-name=
Database name. |
cas.authn.mfa.yubikey.couch-db.password=
Password for connection. |
cas.authn.mfa.yubikey.couch-db.url=http://localhost:5984
Connection url. |
cas.authn.mfa.yubikey.couch-db.username=
Username for connection. |
cas.authn.mfa.yubikey.dynamo-db.credential-access-key=
Use access-key provided by AWS to authenticate. This setting supports the Spring Expression Language. |
cas.authn.mfa.yubikey.dynamo-db.credential-secret-key=
Use secret key provided by AWS to authenticate. This setting supports the Spring Expression Language. |
cas.authn.mfa.yubikey.dynamo-db.endpoint=
AWS custom endpoint. |
cas.authn.mfa.yubikey.dynamo-db.region=
AWS region used. |
cas.authn.mfa.yubikey.jpa.driver-class=org.hsqldb.jdbcDriver
The JDBC driver used to connect to the database. |
cas.authn.mfa.yubikey.jpa.password=
The database connection password. |
cas.authn.mfa.yubikey.jpa.url=jdbc:hsqldb:mem:cas-hsql-database
The database connection URL. This setting supports the Spring Expression Language. |
cas.authn.mfa.yubikey.jpa.user=sa
The database user. The database user must have sufficient permissions to be able to handle schema changes and updates, when needed. |
cas.authn.mfa.yubikey.mongo.client-uri=
The connection uri to the mongodb instance. This typically takes on the form of |
cas.authn.mfa.yubikey.mongo.collection=
MongoDb database collection name to fetch and/or create. |
cas.authn.mfa.yubikey.mongo.database-name=
MongoDb database instance name. |
cas.authn.mfa.yubikey.mongo.host=localhost
MongoDb database host for authentication. Multiple host addresses may be defined, separated by comma. If more than one host is defined, it is assumed that each host contains the port as well, if any. Otherwise the configuration may fallback onto the port defined. |
cas.authn.mfa.yubikey.mongo.password=
MongoDb database password for authentication. |
cas.authn.mfa.yubikey.mongo.port=27017
MongoDb database port. |
cas.authn.mfa.yubikey.mongo.user-id=
MongoDb database user for authentication. |
cas.authn.mfa.yubikey.redis.database=0
Database index used by the connection factory. |
cas.authn.mfa.yubikey.redis.enabled=true
Whether the module is enabled or not, defaults to true. |
cas.authn.mfa.yubikey.redis.host=localhost
Redis server host. |
cas.authn.mfa.yubikey.redis.password=
Login password of the redis server. |
cas.authn.mfa.yubikey.redis.port=6379
Redis server port. |
cas.authn.mfa.yubikey.bypass.authentication-attribute-name=
Skip multifactor authentication based on designated authentication attribute names. |
cas.authn.mfa.yubikey.bypass.authentication-attribute-value=
Optionally, skip multifactor authentication based on designated authentication attribute values. |
cas.authn.mfa.yubikey.bypass.authentication-handler-name=
Skip multifactor authentication depending on form of primary authentication execution. Specifically, skip multifactor if the a particular authentication handler noted by its name successfully is able to authenticate credentials in the primary factor. |
cas.authn.mfa.yubikey.bypass.authentication-method-name=
Skip multifactor authentication depending on method/form of primary authentication execution. Specifically, skip multifactor if the authentication method attribute collected as part of authentication metadata matches a certain value. |
cas.authn.mfa.yubikey.bypass.credential-class-type=
Skip multifactor authentication depending on form of primary credentials. Value must equal the fully qualified class name of the credential type. |
cas.authn.mfa.yubikey.bypass.http-request-headers=
Skip multifactor authentication if the http request contains the defined header names. Header names may be comma-separated and can be regular expressions; values are ignored. |
cas.authn.mfa.yubikey.bypass.http-request-remote-address=
Skip multifactor authentication if the http request's remote address or host matches the value defined here. The value may be specified as a regular expression. |
cas.authn.mfa.yubikey.bypass.principal-attribute-name=
Skip multifactor authentication based on designated principal attribute names. |
cas.authn.mfa.yubikey.bypass.principal-attribute-value=
Optionally, skip multifactor authentication based on designated principal attribute values. |
cas.authn.mfa.yubikey.bypass.rest.basic-auth-password=
If REST endpoint is protected via basic authentication, specify the password for authentication. |
cas.authn.mfa.yubikey.bypass.rest.basic-auth-username=
If REST endpoint is protected via basic authentication, specify the username for authentication. |
cas.authn.mfa.yubikey.bypass.rest.headers=
Headers, defined as a Map, to include in the request when making the REST call. Will overwrite any header that CAS is pre-defined to send and include in the request. Key in the map should be the header name and the value in the map should be the header value. |
cas.authn.mfa.yubikey.bypass.rest.method=GET
HTTP method to use when contacting the rest endpoint. Examples include |
cas.authn.mfa.yubikey.crypto.alg=
The signing/encryption algorithm to use. |
cas.authn.mfa.yubikey.crypto.enabled=true
Whether crypto operations are enabled. |
cas.authn.mfa.yubikey.crypto.encryption.key-size=512
The encryption key size. |
cas.authn.mfa.yubikey.crypto.signing.key-size=512
The signing key size. |
cas.authn.mfa.yubikey.crypto.strategy-type=ENCRYPT_AND_SIGN
Control the cipher sequence of operations. The accepted values are:
|
cas.authn.mfa.yubikey.jpa.pool.max-size=18
Controls the maximum number of connections to keep in the pool, including both idle and in-use connections. |
cas.authn.mfa.yubikey.jpa.pool.max-wait=PT2S
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. This settings supports the
|
cas.authn.mfa.yubikey.jpa.pool.min-size=6
Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections. |
cas.authn.mfa.yubikey.jpa.pool.name=
Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration. |
cas.authn.mfa.yubikey.jpa.pool.suspension=false
Whether or not pool suspension is allowed. There is a performance impact when pool suspension is enabled. Unless you need it (for a redundancy system for example) do not enable it. |
cas.authn.mfa.yubikey.jpa.pool.timeout-millis=1000
The maximum number of milliseconds that the pool will wait for a connection to be validated as alive. |
cas.authn.mfa.yubikey.mongo.pool.idle-time=PT30S
The maximum idle time of a pooled connection. A zero value indicates no limit to the idle time. A pooled connection that has exceeded its idle time will be closed and replaced when necessary by a new connection. This settings supports the
|
cas.authn.mfa.yubikey.mongo.pool.life-time=PT60S
The maximum time a pooled connection can live for. A zero value indicates no limit to the life time. A pooled connection that has exceeded its life time will be closed and replaced when necessary by a new connection. This settings supports the
|
cas.authn.mfa.yubikey.mongo.pool.max-size=10
Maximum number of connections to keep around. |
cas.authn.mfa.yubikey.mongo.pool.max-wait-time=PT60S
The maximum time that a thread may wait for a connection to become available. This settings supports the
|
cas.authn.mfa.yubikey.mongo.pool.min-size=1
Minimum number of connections to keep around. |
cas.authn.mfa.yubikey.mongo.pool.per-host=10
Total number of connections allowed per host. |
cas.authn.mfa.yubikey.redis.cluster.adaptive-topology-refresh=false
Whether adaptive topology refreshing using all available refresh triggers should be used. |
cas.authn.mfa.yubikey.redis.cluster.dynamic-refresh-sources=true
Whether to discover and query all cluster nodes for obtaining the cluster topology. When set to false, only the initial seed nodes are used as sources for topology discovery. |
cas.authn.mfa.yubikey.redis.cluster.max-redirects=0
The max number of redirects to follow. |
cas.authn.mfa.yubikey.redis.cluster.nodes=
List of nodes available in the redis cluster. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].id=
Identifier of this node. |
cas.authn.mfa.yubikey.redis.cluster.nodes[0].name=
Name of this node. |
cas.authn.mfa.yubikey.redis.cluster.topology-refresh-period=
Enables periodic refresh of cluster topology and sets the refresh period. This settings supports the
|
cas.authn.mfa.yubikey.redis.pool.fairness=false
Returns whether or not the pool serves threads waiting to borrow objects fairly. True means that waiting threads are served as if waiting in a FIFO queue. |
cas.authn.mfa.yubikey.redis.pool.lifo=true
Returns whether the pool has LIFO (last in, first out) behaviour with respect to idle objects - always returning the most recently used object from the pool, or as a FIFO (first in, first out) queue, where the pool always returns the oldest object in the idle object pool. |
cas.authn.mfa.yubikey.redis.pool.max-active=8
Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit. |
cas.authn.mfa.yubikey.redis.pool.max-idle=8
Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections. |
cas.authn.mfa.yubikey.redis.pool.max-wait=-1
Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely. |
cas.authn.mfa.yubikey.redis.pool.min-evictable-idle-time-millis=0
Sets the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any - see setTimeBetweenEvictionRunsMillis(long)). When non-positive, no objects will be evicted from the pool due to idle time alone. |
cas.authn.mfa.yubikey.redis.pool.min-idle=0
Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive. |
cas.authn.mfa.yubikey.redis.pool.num-tests-per-eviction-run=0
Sets the maximum number of objects to examine during each run (if any) of the idle object evictor thread. When positive, the number of tests performed for a run will be the minimum of the configured value and the number of idle instances in the pool. When negative, the number of tests performed will be ceil(getNumIdle()/ abs(getNumTestsPerEvictionRun())) which means that when the value is -n roughly one nth of the idle objects will be tested per run. |
cas.authn.mfa.yubikey.redis.pool.soft-min-evictable-idle-time-millis=0
Sets the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any - see setTimeBetweenEvictionRunsMillis(long)), with the extra condition that at least minIdle object instances remain in the pool. This setting is overridden by getMinEvictableIdleTimeMillis() (that is, if getMinEvictableIdleTimeMillis() is positive, then getSoftMinEvictableIdleTimeMillis() is ignored). |
cas.authn.mfa.yubikey.redis.pool.test-on-borrow=false
Returns whether objects borrowed from the pool will be validated before being returned from the borrowObject() method. Validation is performed by the validateObject() method of the factory associated with the pool. If the object fails to validate, it will be removed from the pool and destroyed, and a new attempt will be made to borrow an object from the pool. |
cas.authn.mfa.yubikey.redis.pool.test-on-create=false
Returns whether objects created for the pool will be validated before being returned from the borrowObject() method. Validation is performed by the validateObject() method of the factory associated with the pool. If the object fails to validate, then borrowObject() will fail. |
cas.authn.mfa.yubikey.redis.pool.test-on-return=false
Returns whether objects borrowed from the pool will be validated when they are returned to the pool via the returnObject() method. Validation is performed by the validateObject() method of the factory associated with the pool. Returning objects that fail validation are destroyed rather then being returned the pool. |
cas.authn.mfa.yubikey.redis.pool.test-while-idle=false
Returns whether objects sitting idle in the pool will be validated by the idle object evictor ( if any - see setTimeBetweenEvictionRunsMillis(long)). Validation is performed by the validateObject() method of the factory associated with the pool. If the object fails to validate, it will be removed from the pool and destroyed. |
cas.authn.mfa.yubikey.redis.sentinel.node=
list of host:port pairs. |
cas.authn.mfa.yubikey.allowed-devices=
Collection of allowed devices allowed per user. This is done using a key-value structure where the key is the user the value is the allowed collection of yubikey device ids. |
cas.authn.mfa.yubikey.api-urls=
YubiKey API urls to contact for verification of credentials. |
cas.authn.mfa.yubikey.failure-mode=CLOSED
The failure mode policy for this MFA provider. The authentication policy by default supports fail-closed mode, which means that if you attempt to exercise a particular provider available to CAS and the provider cannot be reached, authentication will be stopped and an error will be displayed. You can of course change this behavior so that authentication proceeds without exercising the provider functionality, if that provider cannot respond. Each defined multifactor authentication provider can set its own failure mode policy. Failure modes set at this location will override the global failure mode, but defer to any failure mode set by the registered service. Available values are as follows:
|
cas.authn.mfa.yubikey.id=
The identifier for the multifactor provider. In most cases, this need not be configured explicitly, unless multiple instances of the same provider type are configured in CAS. |
cas.authn.mfa.yubikey.json-file=
Keep device registration records inside a static JSON resource. |
cas.authn.mfa.yubikey.multiple-device-registration-enabled=false
When enabled, allows the user/system to accept multiple accounts and device registrations per user, allowing one to switch between or register new devices/accounts automatically. |
cas.authn.mfa.yubikey.name=
The name of the authentication handler used to verify credentials in MFA. |
cas.authn.mfa.yubikey.order=
The order of the authentication handler in the chain. |
cas.authn.mfa.yubikey.rank=0
At times, CAS needs to determine the correct provider when step-up authentication is required. Consider for a moment that CAS already has established an SSO session with/without a provider and has reached a level of authentication. Another incoming request attempts to exercise that SSO session with a different and often competing authentication requirement that may differ from the authentication level CAS has already established. Concretely, examples may be:
|
cas.authn.mfa.yubikey.rest.basic-auth-password=
If REST endpoint is protected via basic authentication, specify the password for authentication. |
cas.authn.mfa.yubikey.rest.basic-auth-username=
If REST endpoint is protected via basic authentication, specify the username for authentication. |
cas.authn.mfa.yubikey.rest.headers=
Headers, defined as a Map, to include in the request when making the REST call. Will overwrite any header that CAS is pre-defined to send and include in the request. Key in the map should be the header name and the value in the map should be the header value. |
cas.authn.mfa.yubikey.rest.method=GET
HTTP method to use when contacting the rest endpoint. Examples include |
cas.authn.mfa.yubikey.trusted-device-enabled=false
Indicates whether this provider should support trusted devices. |
cas.authn.mfa.yubikey.couch-db.caching=false
Use a local cache to reduce fetches.. |
cas.authn.mfa.yubikey.couch-db.cleanup-idle-connections=true
Remove idle connections from pool. |
cas.authn.mfa.yubikey.couch-db.connection-timeout=1000
TCP connection timeout. |
cas.authn.mfa.yubikey.couch-db.create-if-not-exists=true
Create the database if it doesn't exist. |
cas.authn.mfa.yubikey.couch-db.enable-ssl=false
Use TLS. Only needed if not specified by URL. |
cas.authn.mfa.yubikey.couch-db.max-cache-entries=1000
Max entries in local cache. |
cas.authn.mfa.yubikey.couch-db.max-connections=20
Maximum connections to CouchDB. |
cas.authn.mfa.yubikey.couch-db.max-object-size-bytes=8192
Largest allowable serialized object. |
cas.authn.mfa.yubikey.couch-db.proxy-host=
Proxy host. |
cas.authn.mfa.yubikey.couch-db.proxy-port=-1
proxy port. |
cas.authn.mfa.yubikey.couch-db.relaxed-ssl-settings=false
Relax TLS settings–like certificate verification. |
cas.authn.mfa.yubikey.couch-db.retries=5
Retries for update conflicts. |
cas.authn.mfa.yubikey.couch-db.socket-timeout=10000
Socket idle timeout. |
cas.authn.mfa.yubikey.couch-db.use-expect-continue=true
Expect HTTP 100 Continue during connection. |
cas.authn.mfa.yubikey.dynamo-db.billing-mode=PROVISIONED
Billing mode specifies how you are charged for read and write throughput and how you manage capacity. Available values are as follows:
|
cas.authn.mfa.yubikey.dynamo-db.client-execution-timeout=10000
Client execution timeout. This settings supports the
|
cas.authn.mfa.yubikey.dynamo-db.connection-timeout=5000
Connection timeout. This settings supports the
|
cas.authn.mfa.yubikey.dynamo-db.drop-tables-on-startup=false
Flag that indicates whether to drop tables on start up. |
cas.authn.mfa.yubikey.dynamo-db.local-address=
Local address. |
cas.authn.mfa.yubikey.dynamo-db.local-instance=false
Indicates that the database instance is local to the deployment that does not require or use any credentials or other configuration other than host and region. This is mostly used during development and testing. |
cas.authn.mfa.yubikey.dynamo-db.max-connections=10
Maximum connections setting. |
cas.authn.mfa.yubikey.dynamo-db.prevent-table-creation-on-startup=false
Flag that indicates whether to prevent CAS from creating tables. |
cas.authn.mfa.yubikey.dynamo-db.profile-name=
Profile name to use. |
cas.authn.mfa.yubikey.dynamo-db.profile-path=
Profile path. |
cas.authn.mfa.yubikey.dynamo-db.proxy-host=
Optionally specifies the proxy host to connect through. |
cas.authn.mfa.yubikey.dynamo-db.proxy-password=
Optionally specifies the proxy password to connect through. |
cas.authn.mfa.yubikey.dynamo-db.proxy-username=
Optionally specifies the proxy username to connect through. |
cas.authn.mfa.yubikey.dynamo-db.read-capacity=10
Read capacity. |
cas.authn.mfa.yubikey.dynamo-db.retry-mode=STANDARD
Outline the requested retry mode. Accepted values are |
cas.authn.mfa.yubikey.dynamo-db.socket-timeout=5000
Socket timeout. This settings supports the
|
cas.authn.mfa.yubikey.dynamo-db.table-name=DynamoDbYubiKeyDevices
The table name used and created by CAS to hold devices in DynamoDb. |
cas.authn.mfa.yubikey.dynamo-db.time-offset=0
Time offset. |
cas.authn.mfa.yubikey.dynamo-db.use-reaper=false
Flag that indicates whether to use reaper. |
cas.authn.mfa.yubikey.dynamo-db.write-capacity=10
Write capacity. |
cas.authn.mfa.yubikey.jpa.autocommit=false
The default auto-commit behavior of connections in the pool. Determined whether queries such as update/insert should be immediately executed without waiting for an underlying transaction. |
cas.authn.mfa.yubikey.jpa.batch-size=100
A non-zero value enables use of JDBC2 batch updates by Hibernate. e.g. recommended values between 5 and 30. |
cas.authn.mfa.yubikey.jpa.data-source-name=
Attempts to do a JNDI data source look up for the data source name specified. Will attempt to locate the data source object as is. |
cas.authn.mfa.yubikey.jpa.ddl-auto=update
Hibernate feature to automatically validate and exports DDL to the schema. By default, creates and drops the schema automatically when a session is starts and ends. Setting the value to
create-drop will result in the loss of all data as soon as CAS is started. For transient data like tickets this is probably not an issue, but in cases like the audit table important data could be lost. Using `update`, while safe for data, is confirmed to result in invalid database state. validate or none settings are likely the only safe options for production use. For more info, see this.
|
cas.authn.mfa.yubikey.jpa.default-catalog=
Qualifies unqualified table names with the given catalog in generated SQL. |
cas.authn.mfa.yubikey.jpa.default-schema=
Qualify unqualified table names with the given schema/tablespace in generated SQL. |
cas.authn.mfa.yubikey.jpa.dialect=org.hibernate.dialect.HSQLDialect
The database dialect is a configuration setting for platform independent software (JPA, Hibernate, etc) which allows such software to translate its generic SQL statements into vendor specific DDL, DML. |
cas.authn.mfa.yubikey.jpa.fail-fast-timeout=1
Set the pool initialization failure timeout.
connectionTimeout or validationTimeout; they will be honored before this timeout is applied. The default value is one millisecond.
|
cas.authn.mfa.yubikey.jpa.fetch-size=100
Used to specify number of rows to be fetched in a select query. |
cas.authn.mfa.yubikey.jpa.generate-statistics=false
Allow hibernate to generate query statistics. |
cas.authn.mfa.yubikey.jpa.health-query=
The SQL query to be executed to test the validity of connections. This is for "legacy" databases that do not support the JDBC4 |
cas.authn.mfa.yubikey.jpa.idle-timeout=PT10M
Controls the maximum amount of time that a connection is allowed to sit idle in the pool. This settings supports the
|
cas.authn.mfa.yubikey.jpa.isolate-internal-queries=false
This property determines whether data source isolates internal pool queries, such as the connection alive test, in their own transaction. Since these are typically read-only queries, it is rarely necessary to encapsulate them in their own transaction. This property only applies if#autocommit is disabled.
|
cas.authn.mfa.yubikey.jpa.isolation-level-name=ISOLATION_READ_COMMITTED
Defines the isolation level for transactions. @see org.springframework.transaction.TransactionDefinition |
cas.authn.mfa.yubikey.jpa.leak-threshold=3000
Controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak. |
cas.authn.mfa.yubikey.jpa.physical-naming-strategy-class-name=org.apereo.cas.hibernate.CasHibernatePhysicalNamingStrategy
Fully-qualified name of the class that can control the physical naming strategy of hibernate. |
cas.authn.mfa.yubikey.jpa.propagation-behavior-name=PROPAGATION_REQUIRED
Defines the propagation behavior for transactions. @see org.springframework.transaction.TransactionDefinition |
cas.authn.mfa.yubikey.jpa.properties=
Additional settings provided by Hibernate in form of key-value pairs. |
cas.authn.mfa.yubikey.jpa.read-only=false
Configures the Connections to be added to the pool as read-only Connections. |
cas.authn.mfa.yubikey.mongo.authentication-database-name=
Name of the database to use for authentication. |
cas.authn.mfa.yubikey.mongo.drop-collection=false
Whether collections should be dropped on startup and re-created. |
cas.authn.mfa.yubikey.mongo.read-concern=AVAILABLE
Read concern. Accepted values are:
|
cas.authn.mfa.yubikey.mongo.read-preference=PRIMARY
Read preference. Accepted values are:
|
cas.authn.mfa.yubikey.mongo.replica-set=
A replica set in MongoDB is a group of |
cas.authn.mfa.yubikey.mongo.retry-writes=false
Sets whether writes should be retried if they fail due to a network error. |
cas.authn.mfa.yubikey.mongo.socket-keep-alive=false
Whether the database socket connection should be tagged with keep-alive. |
cas.authn.mfa.yubikey.mongo.ssl-enabled=false
Whether connections require SSL. |
cas.authn.mfa.yubikey.mongo.timeout=PT5S
MongoDb database connection timeout. This settings supports the
|
cas.authn.mfa.yubikey.mongo.write-concern=ACKNOWLEDGED
Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongo db or to replica sets or to sharded clusters. In sharded clusters, mongo db instances will pass the write concern on to the shards. |
cas.authn.mfa.yubikey.redis.connect-timeout=PT10S
Connection timeout. This settings supports the
|
cas.authn.mfa.yubikey.redis.read-from=
Setting that describes how Lettuce routes read operations to replica nodes. Note that modes referencing MASTER/SLAVE are deprecated (but still supported) in the Lettuce redis client dependency so migrate config to UPSTREAM/REPLICA. Available values are as follows:
|
cas.authn.mfa.yubikey.redis.timeout=PT60S
Command timeout. This settings supports the
|
cas.authn.mfa.yubikey.redis.use-ssl=false
Whether or not to use SSL for connection factory. |
cas.authn.mfa.yubikey.crypto.encryption.key=
The encryption key is a JWT whose length is defined by the encryption key size setting. |
cas.authn.mfa.yubikey.crypto.signing.key=
The signing key is a JWT whose length is defined by the signing key size setting. |
cas.authn.mfa.yubikey.crypto.alg=
The signing/encryption algorithm to use. |
cas.authn.mfa.yubikey.crypto.enabled=true
Whether crypto operations are enabled. |
cas.authn.mfa.yubikey.crypto.encryption.key-size=512
The encryption key size. |
cas.authn.mfa.yubikey.crypto.signing.key-size=512
The signing key size. |
cas.authn.mfa.yubikey.crypto.strategy-type=ENCRYPT_AND_SIGN
Control the cipher sequence of operations. The accepted values are:
|
This CAS feature is able to accept signing and encryption crypto keys. In most scenarios if keys are not provided, CAS will auto-generate them. The following instructions apply if you wish to manually and beforehand create the signing and encryption keys.
Note that if you are asked to create a JWK of a certain size for the key, you are to use the following set of commands to generate the token:
1
2
wget https://raw.githubusercontent.com/apereo/cas/master/etc/jwk-gen.jar
java -jar jwk-gen.jar -t oct -s [size]
The outcome would be similar to:
1
2
3
4
5
{
"kty": "oct",
"kid": "...",
"k": "..."
}
The generated value for k needs to be assigned to the relevant CAS settings. Note that keys generated via
the above algorithm are processed by CAS using the Advanced Encryption Standard (AES) algorithm which is a
specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology.
Control global properties that are relevant to Hibernate, when CAS attempts to employ and utilize database resources, connections and queries.
cas.jdbc.case-insensitive=false
When choosing physical table names, determine whether names should be considered case-insensitive. |
cas.jdbc.gen-ddl=true
Whether to generate DDL after the EntityManagerFactory has been initialized creating/updating all relevant tables. |
cas.jdbc.physical-table-names=
Indicate a physical table name to be used by the hibernate naming strategy in case table names need to be customized for the specific type of database. The key here indicates the CAS-provided table name and the value is the translate physical name for the database. If a match is not found for the CAS-provided table name, then that name will be used by default. |
cas.jdbc.show-sql=false
Whether SQL queries should be displayed in the console/logs. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
By default, all YubiKey accounts for users are allowed to authenticate. Devices that need to be authorized for authentication need to have followed an out-of-band registration process where the record for them is found in one of the following storage backends. Upon authentication, CAS will begin to search the configured registration database for matching record for the authenticated user and device in order to allow for a successful authentication event.
| Storage | Description |
|---|---|
| JSON | See this guide. |
| REST | See this guide. |
| Permissive | See this guide. |
| JPA | See this guide. |
| CouchDb | See this guide. |
| Redis | See this guide. |
| DynamoDb | See this guide. |
| MongoDb | See this guide. |
| Custom | See this guide. |
Device/Account Validation
In the event that a new YubiKey should be registered, it may be desirable to execute additional validation processes before the account is registered with the underlying store. By default, the device registration step only verifies the device token. If you wish to extend this behavior, you can design your own validator that cross-checks the account against alternative sources and databases for validity and authorization:
1
2
3
4
5
6
7
8
9
10
11
package org.apereo.cas.support.yubikey;
@Configuration(value = "myYubiKeyConfiguration", proxyBeanMethods = false)
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyYubiKeyConfiguration {
@Bean
public YubiKeyAccountValidator yubiKeyAccountValidator() {
...
}
}
See this guide to learn more about how to register configurations into the CAS runtime.
REST Protocol Credential Extraction
In the event that the CAS REST Protocol is turned on,
a special credential extractor is injected into the REST authentication engine in
order to recognize YubiKey credentials and authenticate them as part of the REST
request. The expected parameter name in the request body is yubikeyotp.